1. Galois Field (GF) Algebra

A field is a set of elements in which we can do addition, subtraction, multiplication, and division without leaving the set. The #elements in a field is called the order of the field.

GF algebra operates within a finite field, i.e. finite #elements.

1.1 Binary Field

The additive identity of an element is that element itself: subtraction in is equivalent to addition in .

1.2 Extension Fields

An extension field can be created by creating a primitive polynomial ; once a is found, then the elements of the Galois field can be generated. Any primitive polynomial can construct the unique elements including a element and a element, i.e. .

2. RS Encoding

RS codes are BCH codes which are a subset of cyclic block codes. Cyclic block codes are a subset of linear block codes which are a subset of block codes which are a subset of error correction codes in general.

A RS code is specified as with -bit symbols. This means that the encoder takes data symbols of bits each and adds parity symbols to make an symbol codeword. There are parity symbols of bits each. A RS decoder can correct up to symbols that contain errors in a codeword, where .

SymbolMeaning
symbol width, e.g., 4 or 8. Max codeword length
message length (units: symbols)
block length, i.e., message length + correction length
#errors to be corrected,
displacement shift
message information
generator polynomial
parity-check information,
final code word,

The code word that we will transmit is comprised of appended systematically onto ,

encode

2.1 Generator polynomial

Suppose we select the code word generator's roots to be consecutive powers of , and we also start at , then we get:

2.2 Code word polynomial

Now since we have determined our generator , we can construct . Then we can append our message field to it and thus construct our systematic code word .

Example: , which represents the message , i.e., the binary symbol sequence "0000 0000 0000 0000 0000 0000 0000 1110 0000".

Putting together, encodes the 9-symbol message by systematically adding 6-symbol redundancy:

data:

data:

3. RS Decoding

The decoding process is a 5-stage process:

Received word consisting of received symbols , which is the original (transmitted) codeword plus errors :

To simply,

In Section 2, we get that

Suppose that the received code word is

Note that the coefficients of , part of the RS data source field , and , part of the RS check symbol field , has changed from and to 1 and , respectively.

data:

3.1 Syndromes calculation

A RS codeword has syndromes that depend only on errors (NOT on the transmitted codeword). We can get the syndromes by evaluating the received code polynomial at the values of that are the roots of the generator, i.e., :

Thus, we get

3.2 Find an error-locator polynomial

Error pattern consists of error locations and error values :

: error-locator polynomial where the inverse of its roots yield the error-locator numbers (or error-location) ;

: the reciprocal of the error-locator polynomial where the roots of yield the error-locator numbers .

The syndrome components are known; the error locations and the error values are unknown. The is related to the (i.e., also the ) and the by the following set of independent NON-LINEAR equations called weighted power-sum symmetric functions.

Usually there are many solutions to the above set of NON-LINEAR equations; these solutions are within a distance of errors. However, there is always only one correct solution within a distance of symbols; the correct solution is simply the polynomial representing the fewest errors (i.e., the lowest psbl value of ) occurring.

Once is known, the error locations can be determined and the the equation simplifies into a standard set of independent LINEAR equations. We can then solve these LINEAR equations for the .

Let

Divide by , then by , by , by , ... , until the degree of :

Put the previous results into the following form:

A summary of the previous results is:

Combining to form one equation:

Substituting values:

Put in proper form of :

Thus, the error-locator

Therefore, and

3.3 Error locations (Find the roots of )

We find the error locations by first finding the error-locator numbers . The are the roots of or are the inverse of the roots of . There are two equivalent algorithms to find the error locations . They are the Chien search and explicit factorization, which both find the roots in the error-locator.

The Chien search calculates the outputs for all the possible inputs; it is a very simple, brute force, search algorithm. The roots of the reciprocal of the error-locator polynomial are the error-locator numbers .

Find the roots of , i.e., determine for

, , , , ,

The two error-locator (or error location) numbers are and , which leads to .

The Chien search results of and checks with the code word.

3.4 Find the symbol error values

Since , , and are known, we can solve the set of linear equations for

For the example here, these weighted power-sum symmetric functions reduce to:

We can get:

We only need of these equations since we have unknowns (i.e., and ). Pick two equations:

Substitute and to transform the preceding set into the following linear set:

This simplifies to:

We can easily get that and .

3.5 Decoded code word

Now since we have already calculated all our error locations and error values , we have just finished constructing our estimate of the error which is simply the estimate of the noise.

As , and the decoder only has the received vector and the estimated error , the closest code word can be determined as a function of and :

is indeed the same as .

Now strip the message field from the corrected data:

, and thus

References

[1]. [Tutorial on Reed-Solomon error correction coding][http://jeffareid.net/misc/msc-21834.pdf]

[2]. [Reed-Solomon codes'1][https://www.cs.cmu.edu/~guyb/realworld/reedsolomon/reed_solomon_codes.html]

[3]. [Decoding BCH codes][http://ocw.usu.edu/Electrical_and_Computer_Engineering/Error_Control_Coding/lecture7.pdf]

[4]. [Notes on Reed-Solomon codes][https://math.berkeley.edu/~mhaiman/math55/reed-solomon.pdf]

[5]. [Reed-Solomon codes'2][https://www.cs.duke.edu/courses/spring10/cps296.3/rs_scribe.pdf]

[6]. [Implementing Reed-Solomon][https://www.cs.duke.edu/courses/spring11/cps296.3/decoding_rs.pdf]

[7]. [BCH, Reed-Solomon, and related codes][http://www.work.caltech.edu/~ling/webs/EE127/EE127A/handout/Ch9.pdf]